<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import Watermark from '@/utils/watermark'
export default {
  name: 'App',
  data() {
    return {
      systemConfig: {
        isWatermark: '1'
      }
    }
  },
  mounted: function() {

  },
  created() {
    this.loadSystemConfig()
  },
  methods: {
    loadSystemConfig() {
      this.$store.dispatch('getSystemConfig', 'isWatermark').then((res) => {
        this.systemConfig = res
        if (this.systemConfig.isWatermark === '1') {
          Watermark.set(this.defaultSettings.title)
        }
      }).catch((_) => {})
    }
  }
}
</script>
